﻿'Option Strict Off
Option Explicit On
Imports System

Imports System.Data.Common
Imports log4net

Namespace ActTypeDSTableAdapters
    Partial Public Class ActTypePrjTableAdapter
        Inherits System.ComponentModel.Component

        Private Shared logger As ILog = LogManager.GetLogger("ActTypePrjTableAdapter")

        Public Function GetDataByFilter(ByVal dataTable As ActTypeDS.ActTypePrjDataTable, ByVal SQLExpression As String) As Integer
            Dim OriginalCommandText As String
            OriginalCommandText = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText += SQLExpression
                Return Me.Fill(dataTable)
            Catch ex As Exception
                logger.Error(ex.Message)
                logger.Error(ex.StackTrace)
            Finally
                Me.CommandCollection(0).CommandText = OriginalCommandText
            End Try

            Return 0
        End Function

    End Class

    Partial Public Class ActTypePrj2TableAdapter
        Inherits System.ComponentModel.Component

        Public Function GetDataByFilter(ByVal dataTable As ActTypeDS.ActTypePrj2DataTable, ByVal SQLExpression As String) As Integer
            Dim OriginalCommandText As String
            OriginalCommandText = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText += SQLExpression
                Return Me.Fill(dataTable)
            Catch ex As Exception

            Finally
                Me.CommandCollection(0).CommandText = OriginalCommandText
            End Try
        End Function

    End Class
End Namespace